package com.wsd.bookkeeping.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wsd.bookkeeping.entity.Record;
import com.wsd.bookkeeping.entity.query.IncomeListQuery;
import com.wsd.bookkeeping.entity.query.OutcomeListQuery;
import com.wsd.bookkeeping.entity.query.RecordQuery;
import com.wsd.bookkeeping.vo.IncomeListEntityVO;
import com.wsd.bookkeeping.vo.OutcomeListEntityVO;
import com.wsd.bookkeeping.vo.UserIncomeListVO;
import com.wsd.bookkeeping.vo.UserOutcomeListVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface RecordService extends IService<Record> {

    Map<String, Object> queryByRecordId(Integer id);

    List<Map<String, Object>> queryPage(RecordQuery recordQuery);

    List<Map<String, Object>> queryAmountByDate(Integer bookId, String date);

    int deleteByBookId(Integer bookId);


    List<IncomeListEntityVO> queryIncomeList(IncomeListQuery incomeListQuery);
    List<UserIncomeListVO> queryUserIncomeList(IncomeListQuery incomeListQuery, Integer userId);

    List<OutcomeListEntityVO> queryOutcomeList(OutcomeListQuery outcomeListQuery);
    List<UserOutcomeListVO> queryUserOutcomeList( OutcomeListQuery outcomeListQuery, Integer userId);

    Map<String, Map<Integer, BigDecimal>> queryAccountSummaryByBookId(Integer bookId) throws InterruptedException;

    Map<String, Map<String, BigDecimal>> queryAccountClassificationRankByBookId(Integer bookId) throws InterruptedException;
}
